# Makefile
#
# it'd be nice if someone more expert with Makefiles then me could clean this up such that touching a header forces a revuild...

CC = gcc
CFLAGS = -Wall -std=c99 -O2 -g
INCLUDES = -I includes/mavlink/common
LDFLAGS = -lcurl -lpthread
OBJECTS = main.o cam_fetch.o ftp_put.o mav_process.o network.o

tuna_uav: $(OBJECTS)
	$(CC) -o tuna_uav $(CFLAGS) $(INCLUDES) $(LDFLAGS) $(OBJECTS)

imageClean:
	rm -rf out_*.jpg

%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

clean:
	rm -rf *.o
	rm -rf tuna_uav
	rm -rf out_*.jpg
